
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<!--    &lt;!&ndash;10秒刷新一次页面&ndash;&gt;
    <meta http-equiv="refresh" content="0.1">-->
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- Meta, title, CSS, favicons, etc. -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>CSR</title>
    <!-- Bootstrap -->
    <link href="../css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link href="../css/font-awesome.min.css" rel="stylesheet">
    <!-- NProgress -->
    <link href="../css/nprogress.css" rel="stylesheet">
    <!-- iCheck -->
    <link href="../css/green.css" rel="stylesheet">
    <!-- bootstrap-progressbar -->
    <link href="../css/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet">
    <!-- JQVMap -->
    <link href="../css/jqvmap.min.css" rel="stylesheet"/>
    <link href="../css/dropzone.min.css" rel="stylesheet">
    <!-- Custom Theme Style -->
    <link href="../css/custom.min.css" rel="stylesheet">

    <!-- add local/css 2016-8-18 -->
    <link href="../css/appinfoadd.css" rel='stylesheet'>
    <link href="../css/appinfolist.css" rel='stylesheet'>
    <link  rel="stylesheet" href="../layui/css/layui.css" media="all">
</head>
<body style="background-color: #3E5367">

<div class="clearfix"></div>
<div class="row">
    <div class="col-md-12">
        <div class="x_panel">
            <div class="x_title">
                <h2>
                    小程序反馈信息
                </h2>
                <h5 style="padding-left:150px"><a href="javascript:location.reload();"><i class="fa fa-refresh" aria-hidden="true"></i></i></a></h5>
                <div class="clearfix"></div>
            </div>
        </div>
    </div>
    <div class="col-md-12 col-sm-12 col-xs-12">
        <div class="x_panel">
            <div class="x_content">
                <p class="text-muted font-13 m-b-30"></p>
                <div id="datatable-responsive_wrapper"
                     class="dataTables_wrapper form-inline dt-bootstrap no-footer">
                    <div class="row">
                        <table class="layui-hide" id="test" lay-filter="test"></table>
                        <script type="text/html" id="toolbarDemo">

                        </script>
                        <script type="text/html" id="barDemo">
                            <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
                        </script>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- jQuery -->
<script src="../js/jquery.min.js"></script>
<!-- Bootstrap -->
<script src="../js/bootstrap.min.js"></script>
<!-- FastClick -->
<script src="../js/fastclick.js"></script>
<!-- NProgress -->
<script src="../js/nprogress.js"></script>
<!-- jQuery custom content scroller -->
<script src="../js/jquery.mCustomScrollbar.concat.min.js"></script>
<!-- Custom Theme Scripts -->
<script src="../js/dropzone.js"></script>
<!--<script src="js/rollpage.js"></script>-->
<script src="../js/jquery.min.js"></script>
<script src="../js/rollpage.js"></script>
<script src="../layui/layui.js" charset="utf-8"></script>
<script>
    layui.use(['layer', 'form','table'], function(){
        var layer = layui.layer
            ,form = layui.form
            ,table=layui.table;
        table.render({
            elem: '#test'
            ,url:'/feeedback/list'
            ,toolbar: '#toolbarDemo' //开启头部工具栏，并为其绑定左侧模板
            ,defaultToolbar: ['filter', 'exports', 'print', { //自定义头部工具栏右侧图标。如无需自定义，去除该参数即可
                title: '提示'
                ,icon: 'layui-icon-tips'
            }]
            ,title: '用户反馈数据表'
            ,layEvent: 'LAYTABLE_TIPS'
            ,cols: [[
                {type: 'numbers', fixed: 'left'}
                ,{field:'content', title:'反馈内容'}
                ,{field:'information', title:'联系方式'}
                ,{field:'commitdata',title:'提交时间'}
                ,{fixed: 'right', title:'操作', toolbar: '#barDemo',width:100 }
            ]]
        });

        //监听行工具事件
        table.on('tool(test)', function(obj){
            var data = obj.data;
            console.log(obj)
            if(obj.event === 'del'){
                layer.confirm('真的删除行么', function(index){
                    obj.del();
                    layer.close(index);
                });
            }
        });
    });
</script>
</body>
</html>

